home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 23 / AACD 23.iso / AACD / Utilities / FWCalendar / Install < prev    next >
Text File  |  2000-09-14  |  13KB  |  327 lines

  1. (if (= 2 (exists "REXX:" (noreq)))
  2.   (set #defdir "REXX:")
  3.   (set #defdir "S:")
  4. )
  5.  
  6. ;(message "Your language is "@language)
  7. (set #ver (/ @installer-version 65536))
  8. (set #destmsg$ "")
  9. (set #FWCmacro "FWCalendar.rexx")
  10. (set #AddEventmacro "FWCAddEvent.rexx")
  11. (set #RandomFile "FWCRandom.txt")
  12. (set #HistoryFile "FWCHistory")
  13. (set #optionchoices 3)
  14. (set #option1 "")
  15. (set #option2 "")
  16. (set #option3 "")
  17. (set #option4 "")
  18. ;=============================================================================
  19. ; English (default) strings
  20. (set #languagechoice 0)
  21. (set #welcome$ (cat "Welcome to the FWCalendar installation program.\n"
  22.                     "Select the application(s) you will be using with FWCalendar."))
  23. (set #doabort$ "You did not select an application. Would you like to abort the installation?")
  24. (set #doaborthelp$ "You must select an application to continue.")
  25. (set #seldir$ "Select the destination drawer for the ARexx scripts. A new directory will NOT be created.")
  26. (set #FWdestmsg$ " (The recommended location is the FinalWriter/Macros directory)")
  27. (set #bothdestmsg$ " (The recommended location is a common directory of ARexx scripts)")
  28. (set #selLanguage$ (cat "Select which country's preference file should be used. "
  29.                         "Existing preference files will NOT be overwritten."))
  30. (set #docDestMsg$ (cat "The documentation is in HTML format. Where should they be installed? "
  31.                        "An \"FWCDocs\" directory WILL BE created if it doesn't already exist."))
  32. (set #CopyMacrosMsg$ "The following macros will be copied to ")
  33. (set #CopyPrefsMsg$ "The following files will be copied to ")
  34. (set #copyDocsMsg$ "The document directory will be copied to ")
  35. (set #ViewDocsMsg$ "Would you like to view the documents?")
  36. (set #Yes$ "Yes")
  37. (set #Skip$ "Skip this part")
  38. (set #Proceed$ "Proceed")
  39. (set #ViewDocsHelp$ (cat "If you would like to view the docs, press \"" #Yes$ "\", otherwise press \"" #Skip$ "\"."))
  40. ;=============================================================================
  41. ; German strings (24.06.00) by OliverMolz <OliverMolz@t-online.de>
  42. (if (= @language "deutsch")
  43.   (
  44.     (set #languagechoice 1)
  45.     (set #welcome$ (cat "Willkommen zum FWCalendar Installations-Programm.\n"
  46.                         "Wähle die Applikation(en) mit denen Du FWCalendar benutzen möchtest."))
  47.     (set #doabort$ "Du hast keine Applikation gewählt. Möchtest Du die Installation abbrechen?")
  48.     (set #doaborthelp$ "Du mußt eine eine Applikation wählen um fortzufahren.")
  49.     (set #seldir$ "Wähle den Ziel-Pfad für die ARexx-Scripte. Es wird KEIN neues Verzeichnis angelegt.")
  50.     (set #FWdestmsg$ " (Der empfohlene Pfad ist das FinalWriter Macros Verzeichnis)")
  51.     (set #bothdestmsg$ " (Der empfohlene Pfad ist der gewöhnliche Pfad für die ARexx Scripte)")
  52.     (set #selLanguage$ (cat "Wähle welche Sprache und welche Preference-Datei benutzt werden soll. "
  53.                             "Bestehende Preference-Dateien werden NICHT überschrieben."))
  54.     (set #docDestMsg$ (cat "Die Dokumentation ist im HTML-Format. Soll diese installiert werden? "
  55.                            "Ein \"FWCDocs\" Verzeichnis WIRD erstellt, falls dieses nicht existiert."))
  56.     (set #CopyMacrosMsg$ "Die folgenden Makros werden kopiert ")
  57.     (set #CopyPrefsMsg$ "Das folgende Preference-File wird kopiert ")
  58.     (set #copyDocsMsg$ "Das Dokument-.Verzeichnis wird kopiert ")
  59.     (set #ViewDocsMsg$ "Möchtest Du das Dok-File lesen?")
  60.     (set #Yes$ "Ja")
  61.     (set #Skip$ "Überspringe diesen Teil")
  62.     (set #Proceed$ "Weiter")
  63.     (set #ViewDocsHelp$ (cat "Wenn Du das Dok-File lesen möchtest, drücke \"" #Yes$ "\", andererseits, drucke \"" #Skip$ "\"."))
  64.   )
  65. )
  66. ;=============================================================================
  67. ; Spanish strings (29.11.99) by Dámaso D. Estévez <amidde@arrakis.es>
  68. (if (= @language "español")
  69.   (
  70.     (set #languagechoice 3)
  71.     (set #welcome$ (cat "Bienvenido al programa de instalación de `FWCalendar':\n"
  72.                         "elija la(s) aplicación(es) que usarán dicho guión ARexx."))
  73.     (set #doabort$ "No ha seleccionado ninguna aplicación.  ¿Desea abortar la instalación?")
  74.     (set #doaborthelp$ "Ha de seleccionar obligatoriamente una aplicación para continuar.")
  75.     (set #seldir$ "Elija el cajón de destino para los guiones ARexx (NO se creará ningún nuevo directorio).")
  76.     (set #FWdestmsg$ " (Se recomienda el directorio FinalWriter/Macros)")
  77.     (set #bothdestmsg$ " (Se recomienda un directorio común para los guiones ARexx)")
  78.     (set #selLanguage$ (cat "Elija el fichero de preferencias a utilizar según su país "
  79.                             "Los ficheros de preferencias preexistentes NO serán sobreescritos."))
  80.     (set #docDestMsg$ (cat "La documentación se encuentra en formato HTML. ¿Dónde desea instalarla? "
  81.                            "Un directorio \"FWCDocs\" SE CREARÁ si aún no existe."))
  82.     (set #CopyMacrosMsg$ "Las siguientes macros se copiarán en ")
  83.     (set #CopyPrefsMsg$ "El siguiente fichero se copiará en ")
  84.     (set #copyDocsMsg$ "El directorio de documentación se copiará en ")
  85.     (set #ViewDocsMsg$ "¿Le gustaría ver la documentación?")
  86.     (set #Yes$ "Sí")
  87.     (set #Skip$ "Saltar esta parte")
  88.     (set #Proceed$ "Proceder")
  89.     (set #ViewDocsHelp$ (cat "Si desea ver la documentación, presione \"" #Yes$ "\".  En caso contrario presione \"" #Skip$ "\"."))
  90.   )
  91. )
  92. ;=============================================================================
  93. ; Norwegian strings (22.06.00) by Truls Osmundsen (ozzy1@online.no)
  94. (if (= @language "norsk")
  95.   (
  96.     (set #languagechoice 7)
  97.     (set #welcome$ (cat "Velkommen til FWCalendar installasjonsprogram.\n"
  98.                         "Velg de programmene du kommer til å bruke sammen med FWCalendar."))
  99.     (set #doabort$ "Du valgte ikke noe program. Vil du stanse installasjonen?")
  100.     (set #doaborthelp$ "Du må velge et program for å fortsette.")
  101.     (set #seldir$ "Velg en mappe for Arexx-skriptene. En ny mappe vil IKKE bli laget.")
  102.     (set #FWdestmsg$ " (Den vanligste plassen er FinalWriter/Macros mappen)")
  103.     (set #bothdestmsg$ " (Den vanligste plassen er en vanlig ARexx plassering)")
  104.     (set #selLanguage$ (cat "Velg landsutgangspunkt-fil "
  105.                             "(som inneholder språk og fridager) som vil bli brukt. "
  106.                             "Eksisterende filer vil IKKE bli overskrevet."))
  107.     (set #docDestMsg$ (cat "Dokumentasjonen er i HTML format. Hvor skal de installeres? "
  108.                            "En \"FWCDocs\" mappe VIL BLI laget om ingen allerede eksisterer."))
  109.     (set #CopyMacrosMsg$ "Følgende Macroer vil bli kopiert til ")
  110.     (set #CopyPrefsMsg$ "Følgende utgangspunkt-fil vil bli kopiert til ")
  111.     (set #copyDocsMsg$ "Dokumentmappen vil bli kopiert til ")
  112.     (set #ViewDocsMsg$ "Vil du se dokumentene?")
  113.     (set #Yes$ "Ja")
  114.     (set #Skip$ "Hopp over denne delen")
  115.     (set #Proceed$ "Fortsett")
  116.     (set #ViewDocsHelp$ (cat "Om du vil se dokumentene, trykk \"" #Yes$ "\", eller trykk \"" #Skip$ "\"."))
  117.   )
  118. )
  119. ;=============================================================================
  120. ; Swedish strings (00-06-22) by Börje Karlsson
  121. (if (= @language "svenska")
  122.   (
  123.     (set #languagechoice 10)
  124.     (set #welcome$ (cat "Välkommen till FWCalendar installations program.\n"
  125.                         "Välj applikationerna Du vill använda med FWCalendar."))
  126.     (set #doabort$ "Du valde ingen  applikation. Vill Du avsluta installationen?")
  127.     (set #doaborthelp$ "Du måste välja en applikation för att fortsätta.")
  128.     (set #seldir$ "Välj destinations låda för ARexx skripten. En ny LÅDA kommer inte att skapas.")
  129.     (set #FWdestmsg$ " (Rekommenderad plats är FinalWriter/Macros låda)")
  130.     (set #bothdestmsg$ " (Den rekommenderade platsen är en vanlig låda för ARexx skript)")
  131.     (set #selLanguage$ (cat "Välj vilket lands preferens fil "
  132.                             "(Innehållande översättningar och Helgdagar) som skall användas. "
  133.                             "Existerande preferens filer kommer INTE att skrivas över."))
  134.     (set #docDestMsg$ (cat "Dokumentationen är i HTML format. Var skall den installeras? "
  135.                            "En \"FWCDocs\" Låda KOMMER ATT skapas om den inte redan existerar."))
  136.     (set #CopyMacrosMsg$ "Följande makron kommer att kopieras till ")
  137.     (set #CopyPrefsMsg$ "Följande preferens filer kommer att kopieras till ")
  138.     (set #copyDocsMsg$ "Dokumentationen kopieras till ")
  139.     (set #ViewDocsMsg$ "Vill Du läsa dokumentationen?")
  140.     (set #Yes$ "Ja")
  141.     (set #Skip$ "Hoppa över denna del")
  142.     (set #Proceed$ "Fortsätt")
  143.     (set #ViewDocsHelp$ (cat "Om Du vill läsa dokumentationen, tryck \"" #Yes$ "\", annars tryck \"" #Skip$ "\"."))
  144.   )
  145. )
  146. ;=============================================================================
  147. (if (>= #ver 44)
  148.   (showmedia 'PicHandle' 'FWCDocs/Images/FWCalendar.gif' 'upper_center' 'none' 0)
  149. )
  150.  
  151. (until (> #AppChoice 0)
  152.   (set #AppChoice
  153.     (askoptions
  154.       (prompt #welcome$)
  155.       (help @askoptions-help)
  156.       (choices "Final Writer" "PageStream")
  157.       (default 0)
  158.     )
  159.   )
  160.  
  161.   (if (= #AppChoice 0)
  162.     (
  163.       (set #choice
  164.         (askbool
  165.           (prompt #doabort$)
  166.           (help #soaborthelp$)
  167.         )
  168.       )
  169.       (if (= #choice 1)
  170.         (exit (quiet))
  171.       )
  172.     )
  173.   )
  174. );end until
  175.  
  176. (if (= #AppChoice 1)
  177.   ;Application = Final Writer
  178.   (
  179.     (set #destmsg$ #FWdestmsg$)
  180.   )
  181.   (if (= #AppChoice 2)
  182.     ;Application = PageStream
  183.     (
  184.       (if (= 2 (exists "PageStream4:Scripts" (noreq)))
  185.         (set #defdir "PageStream4:Scripts/")
  186.         (if (= 2 (exists "PageStream3:Scripts" (noreq)))
  187.           (set #defdir "PageStream3:Scripts/")
  188.           (if (= 2 (exists "PageStream:Scripts" (noreq)))
  189.             (set #defdir "PageStream:Scripts/")
  190.           )
  191.         )
  192.       )
  193.     )
  194.     ;Application = Both
  195.     (
  196.       (set #destmsg$ #bothdestmsg$)
  197.     )
  198.   )
  199. )
  200.  
  201. (set @default-dest
  202.  (askdir
  203.   (prompt (cat #seldir$ #destmsg$))
  204.   (help @askdir-help)
  205.   (default #defdir)
  206.  )
  207. )
  208.  
  209. (set #docDir
  210.  (askdir
  211.   (prompt #docDestMsg$)
  212.   (help @askdir-help)
  213.   (default @default-dest)
  214.  )
  215. )
  216.  
  217. (if (< (+ (exists (tackon @default-dest "FWCalendar.prefs") (noreq)) (exists (tackon @default-dest "FWCTranslations.txt") (noreq))) 2)
  218.  (
  219.   (set #language
  220.    (askchoice
  221.     (prompt #selLanguage$)
  222.     (choices "American" "Deutsch" "English" "Español" "Français" "Irish" "Italiano" "Norsk" "Português" "Scottish" "Svenska")
  223.     (default #languagechoice)
  224.     (help @askchoice-help)
  225.    )
  226.   )
  227.   (set #language (select #language "American" "Deutsch" "English" "Español" "Français" "Irish" "Italiano" "Norsk" "Português" "Scottish" "Svenska"))
  228.   (set #PrefsFile (cat #language "/FWCalendar.prefs"))
  229.   (set #TranslationsFile (cat #language "/FWCTranslations.txt"))
  230.  )
  231. )
  232.  
  233. (if (= 0 (exists (tackon @default-dest "FWCalendar.prefs") (noreq)))
  234.  (if (= 1 (exists (tackon #language "FWCalendar.prefs") (noreq)))
  235.   (
  236.    (set #option1 #PrefsFile)
  237.    (set #optionchoices (+ #optionchoices 4))
  238.   )
  239.  )
  240. )
  241. (if (= 0 (exists (tackon @default-dest "FWCTranslations.txt") (noreq)))
  242.  (if (= 1 (exists (tackon #language "FWCTranslations.txt") (noreq)))
  243.   (
  244.    (set #option2 #TranslationsFile)
  245.    (set #optionchoices (+ #optionchoices 8))
  246.   )
  247.  )
  248. )
  249. (if (= 0 (exists (tackon @default-dest #RandomFile) (noreq)))
  250.  (if (= 1 (exists #RandomFile (noreq)))
  251.   (
  252.    (set #option3 #RandomFile)
  253.    (set #optionchoices (+ #optionchoices 16))
  254.   )
  255.  )
  256. )
  257. (if (= 0 (exists (tackon @default-dest (tackon #HistoryFile "01")) (noreq)))
  258.  (if (= 1 (exists (tackon #HistoryFile "01") (noreq)))
  259.   (
  260.    (set #option4 #HistoryFile)
  261.    (set #optionchoices (+ #optionchoices 32))
  262.   )
  263.  )
  264. )
  265.  
  266. (if (= @user-level 2)
  267.  (set #optionchoices
  268.   (askoptions
  269.    (prompt #copyPrefsMsg$ @default-dest)
  270.    (help @copyfiles-help)
  271.    (choices #FWCmacro #AddEventmacro #option1 #option2 #option3 #option4)
  272.    (default #optionchoices)
  273.   )
  274.  )
  275. )
  276.  
  277. (if (not (= #optionchoices 0))
  278.  (
  279.   (set #count 0)
  280.   (set #bitmask 1)
  281.   (while (< #count 6)
  282.    (set #option (select #count #FWCmacro #AddEventmacro #option1 #option2 #option3 #option4))
  283.    (if (> (bitand #bitmask #optionchoices) 0)
  284.     (copyfiles
  285.      (prompt "")
  286.      (help "")
  287.      (source (pathonly @icon))
  288.      (dest @default-dest)
  289.      (choices #option)
  290.      (files)
  291.     )
  292.    )
  293.    (set #count (+ #count 1))
  294.    (set #bitmask (shiftleft #bitmask 1))
  295.   )
  296.  )
  297. )
  298.  
  299. (copyfiles
  300.   (prompt #copyDocsMsg$ #docDir)
  301.   (help @copyfiles-help)
  302.   (source (pathonly @icon))
  303.   (dest #docDir)
  304.   (choices "FWCDocs")
  305.   (confirm)
  306. )
  307.  
  308. (if
  309.   (set #choice
  310.     (askbool
  311.       (prompt #ViewDocsMsg$)
  312.       (choices "Yes" "Skip this part")
  313.       (default 1)
  314.       (help #ViewDocsHelp$)
  315.     )
  316.   )
  317.   (
  318.     (set #IndexCmd (tackon #docDir (cat "FWCDocs" "/SendToBrowser.rexx")))
  319.     (rexx #IndexCmd
  320.       (prompt #ShowDocsMsg$)
  321.       (help #ShowDocsHelp$)
  322.     )
  323.   )
  324. )
  325.  
  326. (exit)
  327.